Here we evaluate the Weighted Moving Average(WMA) where for each period for which the WMA is evaluated the historical terms are weighted in accordance with the same set of weights.
[Visual Basic]
Overloads Public Shared Function WeightedMovingAverage( _
ByVal s As Series, _
ByVal weights() As Double _
) As Series
A series where the first term is the value of the moving average corresponding of the latest period, the second term is the value for the previous period and so on.
Exception | Description |
---|---|
ArgumentException | Thrown if the length of the weights and series differ or if either array is empty. |
I.e. The weights shift with the window of the historical values.
Generally speaking the WMA is used in order to allow more weight to be
assigned to more resent price dynamics. Here the length of the weights array
is used as the length of the period over which the moving average is calculated.
If you wish to control the number of periods used within the moving average
then we refer you to
.
(historicalPrices,
weights, lengthOfMovingAverage)
StatisticalEngine Class | StatisticalEngine Members | Overload List
2002 - 2005 Webavail Productions Inc. & Corporate Web Solutions Ltd.. All Rights Reserved.